GBML manual / Screen

screen_fade_in

Takes the color screen_fade put over the picture away again over so many frames, so the picture is back to normal: screen_fade_in(30). It does nothing visible when no fade is on.

Works differently on Game Boy - The Game Boy has 4 shades, so a screen fade moves every shade toward the shade closest to the color: black and white fade exactly, any other color fades to its grey.

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

screen_fade_in(frames)

Arguments

NameType
framesint

Returns

Nothing.

Description

Takes the color that screen_fade put over the picture away again, over so many frames, so the picture is back to normal. screen_fade_in(30) brings it back in half a second.

Example

if (btn_pressed(BTN_A)) {
    screen_fade_in(30);
}

Pressing A brings the picture back over half a second.

The small print

Cost

Nothing once it has finished.

On the GBA

frames of 0 or less puts the picture back at once. It starts from wherever the screen is now, so calling it in the middle of a screen_fade turns the fade round without a jump. When it has finished the fade is off and nothing runs for it any more.

See also: screen_fadescreen_flash